<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title></title>
</head>

<body>
    <form name="testform" action="jsref_onsubmit.asp" onsubmit="alert('Hello ' + testform.fname.value +'!')">

        What is your name?<br />
        <input type="text" name="fname" />
        <input type="submit" value="Submit" />

    </form>
</body>